﻿@model IEnumerable<CAOS.Entity.Usuario>
@{
    ViewBag.Title = "Usuários";
}
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js" type="text/javascript"></script>
<link href="http://code.jquery.com/ui/1.9.0/themes/ui-darkness/jquery-ui.css" rel="stylesheet"
    type="text/css" />
<script src="@Url.Content("~/Content/Plugins/dataTable/js/jquery.dataTables.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/Plugins/dataTable/js/numericCommaSort.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/Plugins/dataTable/js/numericCommaTypeDetect.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/CAOS.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/Plugins/dataTable/css/demo_table.css")" rel="stylesheet"
    type="text/css" />
<link href="@Url.Content("~/Content/Plugins/dataTable/css/demo_table_jui.css")" rel="stylesheet"
    type="text/css" />
<script type="text/javascript">
    $(document).ready(function () {

        configurarDataTable("grid");

    });
</script>
<p>
    <a class="btn btn-large btn-primary" href="@Url.Content("~/Usuario/Create")"><i class="icon-plus-sign icon-white">
    </i>&nbsp Criar Novo </a>
</p>
<div style="width: 600px">
    <table id="grid" class="display dataTable">
        <thead>
            <tr>
                <th style="width: 20%">
                    Login
                </th>
                <th style="width: 30%">
                    Nome
                </th>
                <th style="width: 20%">
                    Email
                </th>
                <th style="width: 30%">
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td align="center">
                        @Html.DisplayFor(modelItem => item.Login)
                    </td>
                    <td align="center">
                        @Html.DisplayFor(modelItem => item.Nome)
                    </td>
                    <td align="center">
                        @Html.DisplayFor(modelItem => item.Email)
                    </td>
                    <td>
                        <a class="btn btn-small btn-info" href="@Url.Content("~/Usuario/Edit/" + item.UsuarioID)">
                            <i class="icon-edit icon-white"></i>Editar </a>&nbsp<a class="btn btn-small btn-danger" href="@Url.Content("~/Usuario/Delete/" + item.UsuarioID)">
                                <i class="icon-trash icon-white"></i>Deletar </a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
